package net.mihome.app.ui;

import android.app.Activity;
import android.content.DialogInterface;
import android.os.Bundle;
import android.view.View;

import net.mihome.app.R;
import net.mihome.app.bean.Tweet;
import net.mihome.app.bean.TweetList;
import net.mihome.app.common.UIHelper;
import net.mihome.app.ui.view.MihomeBigPaperView;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by ZHAO on 2014/12/29 0029.
 */
public class DazibaoActivity extends Activity {
    static DazibaoActivity instance;
    private MihomeBigPaperView mihomeBigPaperView;
    private View mHeadPub_tweet;
    //
    private List<Tweet> listData = new ArrayList<Tweet>();
    private int begin=0;
    private int num=10;
    private int bigPaperType= TweetList.CATALOG_LASTEST;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.frame_dazibao2_friend);
        bigPaperType=getIntent().getIntExtra("id",-1);
        if(bigPaperType<0){
            UIHelper.showAlertDialog(this,"提示","用户信息无效.",new DialogInterface.OnClickListener() {
                @Override
                public void onClick(DialogInterface dialogInterface, int i) {
                    DazibaoActivity.this.finish();
                }
            });
            return ;
        }
        mihomeBigPaperView= (MihomeBigPaperView) findViewById(R.id.dazibao_view);
        mHeadPub_tweet =  findViewById(R.id.mihome_pub_dazibao2);
        mHeadPub_tweet.setVisibility(View.GONE);
        mihomeBigPaperView.initData(bigPaperType);
    }
    @Override
    public void onResume() {
        mihomeBigPaperView.startRefresh();
        super.onResume();
    }
    public void back(View view){
        finish();
    }
 }
